package com.xiaocg.decorator;

/**
 * 装饰器模式测试
 */
public class DecoratorTest {
    public static void main(String[] args) {
        FastFood food = new Rice();
        Integer price = food.getPrice();
        System.out.println("rice:"+price);

        EggDecorator eggDecorator = new EggDecorator(2,"egg",food);
        Integer cost = eggDecorator.cost();
        System.out.println("rice egg : "+cost);
    }
}
